﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YiLe.Model.Domain;
using YiLe.DAL.Dao;

namespace YiLe.DAL.NHibernate
{
    public class Xs_CodeDaoHibernate : BaseHibernate<Xs_Code, Int32>, Xs_CodeDao
    {
        /// <summary>
        /// 根据类型获取code
        /// </summary>
        /// <returns></returns>
        public IList<Xs_Code> GetCodesByType(String type)
        {
            IList<Xs_Code> codes = HibernateTemplate.Find<Xs_Code>("from Xs_Code c where c.CodeType = ?", new Object[] { type });
            return codes;
        }
    }
}
